package com.zrk.oop;

public class AbstractClassLearn {
    public static void main(String[] args) {
        Animal dog = new Dog();
        dog.eat();

    }
}

abstract class Animal {
    int age;

    abstract void eat();
}

class  Dog extends Animal {
    @Override
    void eat() {
        System.out.println("狗也会吃东西!所有动物都有年龄:" + age);
    }
}